package dujiu.luogu.branch;

import java.util.Scanner;

public class P5710 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int x = scanner.nextInt();
        if (x % 2 == 0 && (x>4 && x<=12)){
            System.out.print(1+" "+1+" "+0+" "+0);
        } else if (x % 2 == 0 || (x>4 && x<=12)) {
            System.out.print(0+" "+1+" "+1+" "+0);
        }else {
            System.out.print(0+" "+0+" "+0+" "+1);
        }
        scanner.close();
    }
}
